<template>
  <div>
    <div class="title">
      <el-row>
        <el-col :span="1" style="width: 50px;">
          <span style="color:#757575;">位置 : </span>
        </el-col>
        <el-col :span="20">
          <span class="hand"></span>
        </el-col>
        <el-col :span="20">
          <span class="hand textactive">未反馈消息</span>
        </el-col>
      
      </el-row>
    </div>
    <div class="posttable">
      <el-row type="flex" justify="center" style="margin-bottom: 10px;" class="btn">
        <el-col :span="23">
          <div style="float: left;">
            <el-radio-group v-model="radio" style="margin-top: 20px;">
              <el-radio :label="1">上传未回复简历 ({{notfeedbacknum}})</el-radio>
            </el-radio-group>
          </div>
          <div style="float: right;">
            <el-col>
              <el-input
                style="margin-top: 11px;"
                size="small"
                placeholder="请输入内容"
                @keyup.enter.native="search"
                v-model.trim='searchword'
              >
                
                <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer;" @click="search"></i>
              </el-input>
            </el-col>
          </div>
        </el-col>
      
      </el-row>
      <el-row type="flex" justify="center">
        <el-col :span="23" class="left" style="color: #1198fe;">
          <el-row type="flex" justify="center">
            <el-col :span="24" class="posttable2">
              <el-table
                class="table"
                ref="singleTable"
                highlight-current-row
                :data="tableData"
              >
                <el-table-column
                  prop='推送客户'
                  label="推送客户"
                >
                </el-table-column>
                <el-table-column
                  prop='需求编号'
                  label="需求编号"
                  width="160"
                >
                </el-table-column>
                <el-table-column
                  prop="推送职位"
                  label="推送职位">
                </el-table-column>
                <el-table-column
                  prop="职位级别"
                  label="职位级别">
                </el-table-column>
                <el-table-column
                  prop="所属区域"
                  label="所属区域"
                >
                </el-table-column>
                <el-table-column
                  prop="姓名"
                  label="姓名">
                </el-table-column>
                <el-table-column
                  prop="毕业时间"
                  label="毕业时间"
                >
                </el-table-column>
                <el-table-column
                  prop="出生年月"
                  label="出生年月"
                >
                </el-table-column>
                <el-table-column
                  prop="联系方式"
                  label="联系方式"
                >
                </el-table-column>
                <el-table-column
                  prop="离职状态"
                  label="离职状态"
                >
                </el-table-column>
                <el-table-column
                  prop="期望薪资"
                  label="期望薪资"
                >
                </el-table-column>
                <el-table-column
                  prop="到岗时间"
                  label="到岗时间"
                >
                </el-table-column>
              </el-table>
              
              <div class="pager">
                
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="pagehandleCurrentChange"
                  :current-page.sync="currentPage"
                  :page-size="pagesize"
                  :page-sizes="[5,10,15]"
                  layout="total,prev,pager,next"
                  :total="totalcount"
                >
                </el-pagination>
              </div>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
  import axios from 'axios'
  import qs from 'qs'
  
  export default {
    name: "unfeedmember",
    data() {
      return {
        tableData: [],
        currentPage: 1,
        pagesize: 15,
        totalcount: null,
        searchword: '',
        notfeedbacknum: '',
        radio: 1
      }
    },
    created() {
      this.getTableData();
      this.search();
    },
    methods: {
      //搜索功能
      search() {
        this.currentPage = 1;
        axios.post(this.url + '/todaytask/searchfuzzynotfeedbackinfo', qs.stringify({
          condition: this.searchword,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })).then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            this.tableData = res.data.data.list;
            this.totalcount = res.data.data.total;
          }
        })
      },
      getTableData1() {
        axios.post(this.url + '/todaytask/searchfuzzynotfeedbackinfo', qs.stringify({
          condition: this.searchword,
          pageNum: this.currentPage,
          pageSize: this.pagesize
        })).then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            this.tableData = res.data.data.list;
            this.totalcount = res.data.data.total;
          }
        })
      },
      //获取未反馈消息和待办任务的表格数据
      getTableData() {
        axios.post(this.url + '/todaytask/queryhrtodaytask').then(res => {
          this.unlogin(res.data.code);
          if (res.data.code == 200) {
            this.notfeedbacknum = res.data.data.notfeedbacknum;
          }
        })
      },
      handleSizeChange(val) {
        this.pagesize = val;
        this.getTableData1();
      },
      pagehandleCurrentChange(val) {
        this.currentPage = val;
        this.getTableData1();
      },
    },
    watch: {
      'searchword': function (val) {
        if (val == '') {
          this.currentPage = 1;
          this.getTableData1()
        }
      }
    },
  }
</script>

<style scoped>
  .title {
    background-color: #fff;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    padding-left: 20px;
    margin-top: 6px;
    margin-bottom: 6px;
  }
  
  .posttable {
    min-height: 700px;
    background-color: #fff;
  }
  
  
  .textactive {
    color: #1099ff;
  }
  
  
  .active {
    color: #1397fe;
  }
  
  .pager {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .el-pagination {
    margin-left: 50%;
    transform: translateX(-50%);
  }

</style>
